#!/bin/bash

# 获取当前分支名
current_branch=$(git branch --show-current)

# 检查是否在main分支上
if [ "$current_branch" = "main" ]; then
    echo "错误：不允许在main分支上进行提交！"
    echo "请切换到其他分支进行开发。"
    exit 1
fi

exit 0